<?php
//
defined('BY_JYA') or exit('error');
$return['ischecklogin']=cfc('core')->checklogin('','',true);
$return['member']=cfc('core')->member_show($_SESSION['uid']);
$return['myfee']=$this->model('red')->addmyfee($_SESSION['cityid'],0);
if($return['member']['paycodetime']<time()-300){
	do{
		$paycode=rand(100000000000,999999999999);
		$check=pdo_getcolumn('jy_xiaofeelian_myfee',array('paycode'=>$paycode,'uniacid'=>$_SESSION['uniacid']),'id');
	}while($check);
	pdo_update('jy_xiaofeelian_myfee',array('paycode'=>$paycode,'paycodetime'=>time()),array('id'=>$return['myfee']['id'],'uniacid'=>$_SESSION['uniacid']));
	$return['myfee']['paycode']=$paycode;
}
$hexiaourl=custom_url('jy_xiaofeelian/hexiao//paycode='.$return['myfee']['paycode'],true);
$return['qrcode']=cfc('tools')->createqrcode($hexiaourl,'320',true);
$return['qrcode']=tomedia($return['qrcode']);
$return['item']=$item;
$return['pcd']=$_SESSION['pcd'];
$return['sharedata']=array(
	'title'=>'我的核销码',
	'desc'=>'请提供二维码给店员扫码即可进行核销',
	'link'=>custom_url('jy_xiaofeelian/paycode/',true),
	'imgUrl'=>tomedia($return['member']['avatar']),
);
set_html('title','我的核销码');
exi($return);
?>